package com.shangxia.feign.client;

import com.shangxia.feign.client.fallBack.UserClientFallBackFactory;
import com.shangxia.feign.model.SX_User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author zhouya24
 * @date 2021/11/18 15:26
 * @apiNote UserClient
 */
@FeignClient(value = "userservice",fallbackFactory = UserClientFallBackFactory.class)
@RequestMapping("/user")
public interface UserClient {

    @GetMapping("/user/{id}")
    SX_User queryById(@PathVariable("id") Long id);

}
